<% var formLeftSecitionPart = { %>
		<div class="row cl">
			<label class="form-label col-xs-3"><span class="c-red">*</span>上级栏目：</label>
			<div class="formControls col-xs-6">
				<select name="parentId" class="select-box">
					<option value="0">做为顶级栏目</option>
					<% for(parent in parentList){ %>
					<option value="${parent.id}" ${parent.id==obj.parentId?"selected"} >${parent.name}</option>
					<% } %>
				</select>
			</div>
			<div class="col-xs-3"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3"><span class="c-red">*</span>栏目名称：</label>
			<div class="formControls col-xs-6">
				<input type="text" class="input-text" id="name" name="name" datatype="*2-16" nullmsg="用户名不能为空" value="${obj.name}">
			</div>
			<div class="col-xs-3"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3"><span class="c-red">*</span>展现方式：</label>
			<div class="formControls col-xs-6 skin-minimal" onclick="check_radio_showModes()">
				<div class="radio-box">
					<input type="radio" id="showModes-0" name="showModes" value="0" ${obj.showModes==0?"checked"}>
					<label for="showModes-0">栏目</label>
				</div>
				<div class="radio-box">
					<input type="radio" id="showModes-1" name="showModes" value="1" ${obj.showModes==1?"checked"}>
					<label for="showModes-1">单页</label>
				</div>
				<div class="radio-box">
					<input type="radio" id="showModes-2" name="showModes" value="2" ${obj.showModes==2?"checked"}>
					<label for="showModes-2">链接</label>
				</div>
			</div>
			<div class="col-xs-3"> </div>
		</div>
		<div class="row cl" id="div_radio_href">
			<label class="form-label col-xs-3">href：</label>
			<div class="formControls col-xs-6">
				<input type="text" class="input-text" id="href" name="href" value="${obj.href}">
			</div>
			<div class="col-xs-3"> </div>
		</div>
		<div class="row cl" id="div_radio_listtpl">
			<label class="form-label col-xs-3">列表模板：</label>
			<div class="formControls col-xs-3">
				<select class="select-box" id="select_tpl_list" onchange="changeTplList(this.value)" >
				<option value="0">不选择</option>
				<% for(var tplname in tplList){ %>
				<option value="${tplname.value}">${tplname.name}</option>
				<% } %>
				</select>
			</div>
			<div class="formControls col-xs-3">
				<input type="text" class="input-text" id="customListView" name="customListView" value="${obj.customListView}">
			</div>
			<div class="col-xs-3"> </div>
		</div>
		<div class="row cl" id="div_radio_contenttpl">
			<label class="form-label col-xs-3">内容模板：</label>
			<div class="formControls col-xs-3">
				<select class="select-box" id="select_tpl_content" onchange="changeTplContent(this.value)" >
				<option value="0">不选择</option>
				<% for(var tplname in tplList){ %>
				<option value="${tplname.value}">${tplname.name}</option>
				<% } %>
				</select>
			</div>
			<div class="formControls col-xs-3">
				<input type="text" class="input-text" id="customContentView" name="customContentView" value="${obj.customContentView}">
			</div>
			<div class="col-xs-3"> </div>
		</div>
		<div class="row cl" id="div_radio_viewConfig">
			<label class="form-label col-xs-3"><span class="c-red"></span>单面内容：</label>
			<div class="formControls col-xs-9">
              <script id="viewConfig" name="viewConfig" type="text/plain">${obj.viewConfig}</script>
              <script type="text/javascript" src="${STATIC}/lib/ueditor/ueditor.config.js"></script>
              <script type="text/javascript" src="${STATIC}/lib/ueditor/ueditor.all.min.js"></script>
              <script type="text/javascript">UE.getEditor('viewConfig');</script>
			</div>
		</div>
		
		<div class="row cl">
			<label class="form-label col-xs-3"><span class="c-red">*</span>是否在导航中显示：</label>
			<div class="formControls col-xs-6 skin-minimal">
				<div class="radio-box">
					<input type="radio" id="inMenu-1" name="inMenu" value="1" ${obj.inMenu==1?"checked"}>
					<label for="inMenu-1">是</label>
				</div>
				<div class="radio-box">
					<input type="radio" id="inMenu-0" name="inMenu" value="0" ${obj.inMenu==0?"checked"}>
					<label for="inMenu-0">否</label>
				</div>
			</div>
			<div class="col-xs-3"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3"><span class="c-red">*</span>是否显示子导航菜单：</label>
			<div class="formControls col-xs-6 skin-minimal">
				<div class="radio-box">
					<input type="radio" id="showChild-1" name="showChild" value="1" ${obj.showChild==1?"checked"}>
					<label for="showChild-1">是</label>
				</div>
				<div class="radio-box">
					<input type="radio" id="showChild-0" name="showChild" value="0" ${obj.showChild==0?"checked"}>
					<label for="showChild-0">否</label>
				</div>
			</div>
			<div class="col-xs-3"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3"><span class="c-red">*</span>是否允许评论：</label>
			<div class="formControls col-xs-6 skin-minimal">
				<div class="radio-box">
					<input type="radio" id="allowComment-1" name="allowComment" value="1" ${obj.allowComment==1?"checked":""}>
					<label for="allowComment-1">是</label>
				</div>
				<div class="radio-box">
					<input type="radio" id="allowComment-0" name="allowComment" value="0" ${obj.allowComment==0?"checked":""}>
					<label for="allowComment-0">否</label>
				</div>
			</div>
			<div class="col-xs-3"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3"><span class="c-red">*</span>是否需要审核：</label>
			<div class="formControls col-xs-6 skin-minimal">
				<div class="radio-box">
					<input type="radio" id="isAudit-1" name="isAudit" value="1" ${obj.isAudit==1?"checked":""}>
					<label for="isAudit-1">是</label>
				</div>
				<div class="radio-box">
					<input type="radio" id="isAudit-0" name="isAudit" value="0" ${obj.isAudit==0?"checked":""}>
					<label for="isAudit-0">否</label>
				</div>
			</div>
			<div class="col-xs-3"> </div>
		</div>
		<div class="row cl">
          <label class="form-label col-xs-3">栏目简介：</label>
          <div class="formControls col-xs-6">
            <textarea id="remarks" name="remarks" cols="" rows="" class="textarea"  placeholder="栏目简介...100个字符以内" dragonfly="true" onKeyUp="textarealength(this,100)">${obj.remarks}</textarea>
            <p class="textarea-numberbar"><em class="textarea-length">0</em>/100</p>
          </div>
          <div class="col-xs-3"> </div>
        </div>
<%};%>
<% var formRightSecitionPart = { %>
      <div class="panel panel-default">
        <div class="panel-header">说明</div>
        <div class="panel-body">
          <h5>栏目的列表模板默认为：/tpl/column</h5>
          <h5>栏目的内容模板默认为：/tpl/article</h5>
        </div>
      </div>
<%};%>
<% var jsSecitionPart = { %>
<script type="text/javascript">
var isFirstSelectList = true;
function changeTplList(v) {
	if(0==v){
		if(!isFirstSelectList)
			$("#customListView").val("");
	}else{
		$("#customListView").val("/tpl/"+v);
		isFirstSelectList = false;
	}
}
var isFirstSelectContent = true;
function changeTplContent(v) {
	if(0==v){
		if(!isFirstSelectContent)
			$("#customContentView").val("");
	}else{
		$("#customContentView").val("/tpl/"+v);
		isFirstSelectContent = false;
	}
}
function check_radio_showModes(){
	var cval = $('input:radio[name=showModes]:checked').val();
	if(1==cval){
		$("#div_radio_href").hide();
		$("#div_radio_listtpl").hide();
		$("#div_radio_contenttpl").show();
		$("#div_radio_viewConfig").show();
	}else if(2==cval){
		$("#div_radio_href").show();
		$("#div_radio_listtpl").hide();
		$("#div_radio_contenttpl").hide();
		$("#div_radio_viewConfig").hide();
	}else{
		$("#div_radio_href").hide();
		$("#div_radio_listtpl").show();
		$("#div_radio_contenttpl").show();
		$("#div_radio_viewConfig").hide();
	}
}

$(function(){
	check_radio_showModes();
});
</script>
<%};
  include("/admin/inc/layout_edit.html",{
  	baseUrl:BASE+'/admin/cms/column',
  	entityName:'栏目',
  	isUpload:false,
  	formLeftSecition:formLeftSecitionPart,
  	formRightSecition:formRightSecitionPart,
  	jsSecition:jsSecitionPart
  }){}
 %>